package cn.wch.blelib.peripheral.builder;

import android.bluetooth.BluetoothGattDescriptor;

import java.util.UUID;

import androidx.annotation.NonNull;

/**
 * 蓝牙Gatt描述符生成器
 */
public class BluetoothGattDescriptorBuilder {
    private final UUID uuid;
    private final int permissions;

    /**
     * 实例化
     * @param uuid uuid
     * @param permissions 权限
     */
    public BluetoothGattDescriptorBuilder(@NonNull UUID uuid, int permissions) {
        this.uuid = uuid;
        this.permissions=permissions;
    }

    /**
     * 构造函数
     * @return
     */
    public BluetoothGattDescriptor build(){
        BluetoothGattDescriptor descriptor=new BluetoothGattDescriptor(uuid,permissions);
        return descriptor;
    }
}
